import request from '../http/axios';
import qs from 'qs';

export function getIndex(data:any) {
    return request({
        url:'/user/',
        method:'get',
        data
    })
};

export function getCameras(data:any) {
    return request({
        url:'/camera/cameras',
        method:'post',
        data:qs.stringify(data)
    })
};

export function closeCameras(data:number) {
    return request({
        url:'/camera/cameras/'+data,
        method:'DELETE',
    })
};

export function liveCameras(data:number) {
    return request({
        url:'/camera/cameras/'+data,
        method:'put',
    })
};

